<?php $view = $this; if(1!=1)$view = new View(); ?>
<p><a href="?m=ieitems&a=add" onclick="showWindow('addieitems', this.href, 'get', 1, {'cover':'1'}); return false;">增加收支项目</a></p>
<table style="width:100%;" class="data">
<tr><th style="width:18px;">&nbsp;</th><th style="display: none;">ID</th><th>ItemName</th><th>ItemType</th><th>Remark</th><th>操作</th></tr>
<?php foreach($this->TreeData as $k=>$v):?>
<tr>
<td>&nbsp;</td>
<td style="display: none;"><?php echo $v['AID'];?>&nbsp;</td>
<td><?php echo $v['ItemName']?>&nbsp;</td>
<td><?php echo $v['ItemType'] == 1 ? '收入' : '支出'?>&nbsp;<?php echo $v['ItemType'];?></td>
<td><?php echo $v['Remark']?>&nbsp;</td>
<td><a href="?m=ieitems&a=edit&aid=<?php echo $v['AID'];?>">修改</a></td>
</tr>
<?php if($v['child']):?>
<?php foreach($v['child'] as $ck=>$cv):?>
<tr>
<td style="border: 0;">&nbsp;</td>
<td style="display: none;"><?php echo $cv['AID'];?>&nbsp;</td>
<td> &nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;<?php echo $cv['ItemName']?>&nbsp;</td>
<td><?php echo $cv['ItemType'] == 1 ? '收入' : '支出'?>&nbsp;<?php echo $cv['ItemType'];?></td>
<td><?php echo $cv['Remark']?>&nbsp;</td>
<td><a href="?m=ieitems&a=edit&aid=<?php echo $cv['AID'];?>">修改</a></td>
</tr>
<?php endforeach;?>
<?php endif;?>


<?php endforeach;?>
</table>